﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.Modules.Commissioning
{
    [NHibernateEntity(Table = "Commissions")]
    public class Commission : ITrackable
    {
        public Commission() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [BelongsTo(Column = "ID_Contract")]
        public virtual Contract Contract { get; set; }

        [BelongsTo(Column = "ID_ContractProduct")]
        public virtual ContractProduct ContractProduct { get; set; }

        [BelongsTo(Column = "ID_CommissionType")]
        public virtual CommissionType CommissionType { get; set; }

        [BelongsTo(Column = "ID_CommissionCalculation")]
        public virtual CommissionCalculation CommissionCalculation { get; set; }

        [BelongsTo(Column = "ID_Employee")]
        public virtual Employee Employee { get; set; }

        [BelongsTo(Column = "ID_Currency")]
        public virtual Currency Currency { get; set; }

        [BelongsTo(Column = "ID_TimeTableItem")]
        public virtual TimeTableItem TimeTableItem { get; set; }

        [BelongsTo(Column = "ID_CommissionPayroll")]
        public virtual CommissionPayroll CommissionPayroll { get; set; }

        [BelongsTo(Column = "ID_Parent_Commission")]
        public virtual Commission Parent { get; set; }

        [Property]
        public virtual double GrossValue { get; set; }

        [Property]
        public virtual double BaseValue { get; set; }

        [Property]
        public virtual double ProcentValue { get; set; }

        [Property]
        public virtual string Reason { get; set; }


        [Property]
        public virtual int Month { get; set; }

        [Property]
        public virtual int Year { get; set; }



        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }
    }
}
